<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>OpenAPI specification</title>
    <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
    <style>
        body {
            margin: 0;
            padding: 0;
        }

    </style>
    <script defer="defer" src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
    <script defer="defer">
        document.addEventListener("DOMContentLoaded", function () {
            spec = {
    "openapi": "3.1.0",
    "info": {
        "title": "[DRAFT] Llama Stack Specification",
        "version": "0.0.1",
        "description": "This is the specification of the llama stack that provides\n                a set of endpoints and their corresponding interfaces that are tailored to\n                best leverage Llama Models. The specification is still in draft and subject to change.\n                Generated at 2024-10-31 14:28:52.128905"
    },
    "servers": [
        {
            "url": "http://any-hosted-llama-stack.com"
        }
    ],
    "paths": {
        "/batch_inference/chat_completion": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BatchChatCompletionResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "BatchInference"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BatchChatCompletionRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/batch_inference/completion": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BatchCompletionResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "BatchInference"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BatchCompletionRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/post_training/job/cancel": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "PostTraining"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CancelTrainingJobRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/inference/chat_completion": {
            "post": {
                "responses": {
                    "200": {
                        "description": "Chat completion response. **OR** SSE-stream of these events.",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/ChatCompletionResponse"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ChatCompletionResponseStreamChunk"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Inference"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ChatCompletionRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/inference/completion": {
            "post": {
                "responses": {
                    "200": {
                        "description": "Completion response. **OR** streamed completion response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/CompletionResponse"
                                        },
                                        {
                                            "$ref": "#/components/schemas/CompletionResponseStreamChunk"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Inference"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CompletionRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/agents/create": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AgentCreateResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Agents"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateAgentRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/agents/session/create": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AgentSessionCreateResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Agents"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateAgentSessionRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/agents/turn/create": {
            "post": {
                "responses": {
                    "200": {
                        "description": "A single turn in an interaction with an Agentic System. **OR** streamed agent turn completion response.",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/Turn"
                                        },
                                        {
                                            "$ref": "#/components/schemas/AgentTurnResponseStreamChunk"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Agents"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateAgentTurnRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/agents/delete": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "Agents"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DeleteAgentsRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/agents/session/delete": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "Agents"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DeleteAgentsSessionRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/inference/embeddings": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmbeddingsResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Inference"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EmbeddingsRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/eval/evaluate": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EvaluateResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Eval"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EvaluateRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/eval/evaluate_batch": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Job"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Eval"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EvaluateBatchRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/agents/session/get": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Session"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Agents"
                ],
                "parameters": [
                    {
                        "name": "agent_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "session_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/GetAgentsSessionRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/agents/step/get": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AgentStepResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Agents"
                ],
                "parameters": [
                    {
                        "name": "agent_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "session_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "turn_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "step_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/agents/turn/get": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Turn"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Agents"
                ],
                "parameters": [
                    {
                        "name": "agent_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "session_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "turn_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/datasets/get": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/DatasetDefWithProvider"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Datasets"
                ],
                "parameters": [
                    {
                        "name": "dataset_identifier",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/memory_banks/get": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "oneOf": [
                                                {
                                                    "$ref": "#/components/schemas/VectorMemoryBankDef"
                                                },
                                                {
                                                    "$ref": "#/components/schemas/KeyValueMemoryBankDef"
                                                },
                                                {
                                                    "$ref": "#/components/schemas/KeywordMemoryBankDef"
                                                },
                                                {
                                                    "$ref": "#/components/schemas/GraphMemoryBankDef"
                                                }
                                            ]
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "MemoryBanks"
                ],
                "parameters": [
                    {
                        "name": "identifier",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/models/get": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/ModelDefWithProvider"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Models"
                ],
                "parameters": [
                    {
                        "name": "identifier",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/datasetio/get_rows_paginated": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedRowsResult"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "DatasetIO"
                ],
                "parameters": [
                    {
                        "name": "dataset_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "rows_in_page",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page_token",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter_condition",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/scoring_functions/get": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/ScoringFnDefWithProvider"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "ScoringFunctions"
                ],
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/shields/get": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/ShieldDefWithProvider"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Shields"
                ],
                "parameters": [
                    {
                        "name": "shield_type",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/telemetry/get_trace": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Trace"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Telemetry"
                ],
                "parameters": [
                    {
                        "name": "trace_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/post_training/job/artifacts": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostTrainingJobArtifactsResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "PostTraining"
                ],
                "parameters": [
                    {
                        "name": "job_uuid",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/post_training/job/logs": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostTrainingJobLogStream"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "PostTraining"
                ],
                "parameters": [
                    {
                        "name": "job_uuid",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/post_training/job/status": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostTrainingJobStatusResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "PostTraining"
                ],
                "parameters": [
                    {
                        "name": "job_uuid",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/post_training/jobs": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/jsonl": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostTrainingJob"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "PostTraining"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/health": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HealthInfo"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Inspect"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/memory/insert": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "Memory"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/InsertDocumentsRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/eval/job/cancel": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "Eval"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/JobCancelRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/eval/job/result": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EvaluateResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Eval"
                ],
                "parameters": [
                    {
                        "name": "job_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/eval/job/status": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/JobStatus"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Eval"
                ],
                "parameters": [
                    {
                        "name": "job_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/datasets/list": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/jsonl": {
                                "schema": {
                                    "$ref": "#/components/schemas/DatasetDefWithProvider"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Datasets"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/memory_banks/list": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/jsonl": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/VectorMemoryBankDef"
                                        },
                                        {
                                            "$ref": "#/components/schemas/KeyValueMemoryBankDef"
                                        },
                                        {
                                            "$ref": "#/components/schemas/KeywordMemoryBankDef"
                                        },
                                        {
                                            "$ref": "#/components/schemas/GraphMemoryBankDef"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "MemoryBanks"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/models/list": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/jsonl": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelDefWithProvider"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Models"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/providers/list": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "$ref": "#/components/schemas/ProviderInfo"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Inspect"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/routes/list": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "$ref": "#/components/schemas/RouteInfo"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Inspect"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/scoring_functions/list": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/jsonl": {
                                "schema": {
                                    "$ref": "#/components/schemas/ScoringFnDefWithProvider"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "ScoringFunctions"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/shields/list": {
            "get": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/jsonl": {
                                "schema": {
                                    "$ref": "#/components/schemas/ShieldDefWithProvider"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Shields"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/telemetry/log_event": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "Telemetry"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LogEventRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/post_training/preference_optimize": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostTrainingJob"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "PostTraining"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PreferenceOptimizeRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/memory/query": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/QueryDocumentsResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Memory"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/QueryDocumentsRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/datasets/register": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "Datasets"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegisterDatasetRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/memory_banks/register": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "MemoryBanks"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegisterMemoryBankRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/models/register": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "Models"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegisterModelRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/scoring_functions/register": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "ScoringFunctions"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegisterScoringFunctionRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/shields/register": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "tags": [
                    "Shields"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegisterShieldRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/safety/run_shield": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RunShieldResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Safety"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RunShieldRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/scoring/score": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ScoreResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Scoring"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ScoreRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/scoring/score_batch": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ScoreBatchResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Scoring"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ScoreBatchRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/post_training/supervised_fine_tune": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PostTrainingJob"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "PostTraining"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SupervisedFineTuneRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        },
        "/synthetic_data_generation/generate": {
            "post": {
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SyntheticDataGenerationResponse"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "SyntheticDataGeneration"
                ],
                "parameters": [
                    {
                        "name": "X-LlamaStack-ProviderData",
                        "in": "header",
                        "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SyntheticDataGenerateRequest"
                            }
                        }
                    },
                    "required": true
                }
            }
        }
    },
    "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
    "components": {
        "schemas": {
            "BuiltinTool": {
                "type": "string",
                "enum": [
                    "brave_search",
                    "wolfram_alpha",
                    "photogen",
                    "code_interpreter"
                ]
            },
            "CompletionMessage": {
                "type": "object",
                "properties": {
                    "role": {
                        "type": "string",
                        "const": "assistant",
                        "default": "assistant"
                    },
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "stop_reason": {
                        "$ref": "#/components/schemas/StopReason"
                    },
                    "tool_calls": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ToolCall"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "role",
                    "content",
                    "stop_reason",
                    "tool_calls"
                ]
            },
            "ImageMedia": {
                "type": "object",
                "properties": {
                    "image": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "format": {
                                        "type": "string"
                                    },
                                    "format_description": {
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": false,
                                "title": "This class represents an image object.  To create"
                            },
                            {
                                "$ref": "#/components/schemas/URL"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "image"
                ]
            },
            "SamplingParams": {
                "type": "object",
                "properties": {
                    "strategy": {
                        "$ref": "#/components/schemas/SamplingStrategy",
                        "default": "greedy"
                    },
                    "temperature": {
                        "type": "number",
                        "default": 0.0
                    },
                    "top_p": {
                        "type": "number",
                        "default": 0.95
                    },
                    "top_k": {
                        "type": "integer",
                        "default": 0
                    },
                    "max_tokens": {
                        "type": "integer",
                        "default": 0
                    },
                    "repetition_penalty": {
                        "type": "number",
                        "default": 1.0
                    }
                },
                "additionalProperties": false,
                "required": [
                    "strategy"
                ]
            },
            "SamplingStrategy": {
                "type": "string",
                "enum": [
                    "greedy",
                    "top_p",
                    "top_k"
                ]
            },
            "StopReason": {
                "type": "string",
                "enum": [
                    "end_of_turn",
                    "end_of_message",
                    "out_of_tokens"
                ]
            },
            "SystemMessage": {
                "type": "object",
                "properties": {
                    "role": {
                        "type": "string",
                        "const": "system",
                        "default": "system"
                    },
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "role",
                    "content"
                ]
            },
            "ToolCall": {
                "type": "object",
                "properties": {
                    "call_id": {
                        "type": "string"
                    },
                    "tool_name": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/BuiltinTool"
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "arguments": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "array",
                                    "items": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "integer"
                                            },
                                            {
                                                "type": "number"
                                            },
                                            {
                                                "type": "boolean"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "type": "object",
                                    "additionalProperties": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "integer"
                                            },
                                            {
                                                "type": "number"
                                            },
                                            {
                                                "type": "boolean"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    }
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "call_id",
                    "tool_name",
                    "arguments"
                ]
            },
            "ToolChoice": {
                "type": "string",
                "enum": [
                    "auto",
                    "required"
                ]
            },
            "ToolDefinition": {
                "type": "object",
                "properties": {
                    "tool_name": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/BuiltinTool"
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "description": {
                        "type": "string"
                    },
                    "parameters": {
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/ToolParamDefinition"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "tool_name"
                ]
            },
            "ToolParamDefinition": {
                "type": "object",
                "properties": {
                    "param_type": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "required": {
                        "type": "boolean",
                        "default": true
                    },
                    "default": {
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "array"
                            },
                            {
                                "type": "object"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "param_type"
                ]
            },
            "ToolPromptFormat": {
                "type": "string",
                "enum": [
                    "json",
                    "function_tag",
                    "python_list"
                ],
                "title": "This Enum refers to the prompt format for calling custom / zero shot tools",
                "description": "`json` --\n    Refers to the json format for calling tools.\n    The json format takes the form like\n    {\n        \"type\": \"function\",\n        \"function\" : {\n            \"name\": \"function_name\",\n            \"description\": \"function_description\",\n            \"parameters\": {...}\n        }\n    }\n\n`function_tag` --\n    This is an example of how you could define\n    your own user defined format for making tool calls.\n    The function_tag format looks like this,\n    <function=function_name>(parameters)</function>\n\nThe detailed prompts for each of these formats are added to llama cli"
            },
            "ToolResponseMessage": {
                "type": "object",
                "properties": {
                    "role": {
                        "type": "string",
                        "const": "ipython",
                        "default": "ipython"
                    },
                    "call_id": {
                        "type": "string"
                    },
                    "tool_name": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/BuiltinTool"
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "role",
                    "call_id",
                    "tool_name",
                    "content"
                ]
            },
            "URL": {
                "type": "string",
                "format": "uri",
                "pattern": "^(https?://|file://|data:)"
            },
            "UserMessage": {
                "type": "object",
                "properties": {
                    "role": {
                        "type": "string",
                        "const": "user",
                        "default": "user"
                    },
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "context": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "role",
                    "content"
                ]
            },
            "BatchChatCompletionRequest": {
                "type": "object",
                "properties": {
                    "model": {
                        "type": "string"
                    },
                    "messages_batch": {
                        "type": "array",
                        "items": {
                            "type": "array",
                            "items": {
                                "oneOf": [
                                    {
                                        "$ref": "#/components/schemas/UserMessage"
                                    },
                                    {
                                        "$ref": "#/components/schemas/SystemMessage"
                                    },
                                    {
                                        "$ref": "#/components/schemas/ToolResponseMessage"
                                    },
                                    {
                                        "$ref": "#/components/schemas/CompletionMessage"
                                    }
                                ]
                            }
                        }
                    },
                    "sampling_params": {
                        "$ref": "#/components/schemas/SamplingParams"
                    },
                    "tools": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ToolDefinition"
                        }
                    },
                    "tool_choice": {
                        "$ref": "#/components/schemas/ToolChoice"
                    },
                    "tool_prompt_format": {
                        "$ref": "#/components/schemas/ToolPromptFormat"
                    },
                    "logprobs": {
                        "type": "object",
                        "properties": {
                            "top_k": {
                                "type": "integer",
                                "default": 0
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "additionalProperties": false,
                "required": [
                    "model",
                    "messages_batch"
                ]
            },
            "BatchChatCompletionResponse": {
                "type": "object",
                "properties": {
                    "completion_message_batch": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CompletionMessage"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "completion_message_batch"
                ]
            },
            "BatchCompletionRequest": {
                "type": "object",
                "properties": {
                    "model": {
                        "type": "string"
                    },
                    "content_batch": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "$ref": "#/components/schemas/ImageMedia"
                                },
                                {
                                    "type": "array",
                                    "items": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "$ref": "#/components/schemas/ImageMedia"
                                            }
                                        ]
                                    }
                                }
                            ]
                        }
                    },
                    "sampling_params": {
                        "$ref": "#/components/schemas/SamplingParams"
                    },
                    "logprobs": {
                        "type": "object",
                        "properties": {
                            "top_k": {
                                "type": "integer",
                                "default": 0
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "additionalProperties": false,
                "required": [
                    "model",
                    "content_batch"
                ]
            },
            "BatchCompletionResponse": {
                "type": "object",
                "properties": {
                    "completion_message_batch": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CompletionMessage"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "completion_message_batch"
                ]
            },
            "CancelTrainingJobRequest": {
                "type": "object",
                "properties": {
                    "job_uuid": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_uuid"
                ]
            },
            "ChatCompletionRequest": {
                "type": "object",
                "properties": {
                    "model": {
                        "type": "string"
                    },
                    "messages": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/UserMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/SystemMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/ToolResponseMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/CompletionMessage"
                                }
                            ]
                        }
                    },
                    "sampling_params": {
                        "$ref": "#/components/schemas/SamplingParams"
                    },
                    "tools": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ToolDefinition"
                        }
                    },
                    "tool_choice": {
                        "$ref": "#/components/schemas/ToolChoice"
                    },
                    "tool_prompt_format": {
                        "$ref": "#/components/schemas/ToolPromptFormat"
                    },
                    "response_format": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "json_schema",
                                        "default": "json_schema"
                                    },
                                    "json_schema": {
                                        "type": "object",
                                        "additionalProperties": {
                                            "oneOf": [
                                                {
                                                    "type": "null"
                                                },
                                                {
                                                    "type": "boolean"
                                                },
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "array"
                                                },
                                                {
                                                    "type": "object"
                                                }
                                            ]
                                        }
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type",
                                    "json_schema"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "grammar",
                                        "default": "grammar"
                                    },
                                    "bnf": {
                                        "type": "object",
                                        "additionalProperties": {
                                            "oneOf": [
                                                {
                                                    "type": "null"
                                                },
                                                {
                                                    "type": "boolean"
                                                },
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "array"
                                                },
                                                {
                                                    "type": "object"
                                                }
                                            ]
                                        }
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type",
                                    "bnf"
                                ]
                            }
                        ]
                    },
                    "stream": {
                        "type": "boolean"
                    },
                    "logprobs": {
                        "type": "object",
                        "properties": {
                            "top_k": {
                                "type": "integer",
                                "default": 0
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "additionalProperties": false,
                "required": [
                    "model",
                    "messages"
                ]
            },
            "ChatCompletionResponse": {
                "type": "object",
                "properties": {
                    "completion_message": {
                        "$ref": "#/components/schemas/CompletionMessage"
                    },
                    "logprobs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TokenLogProbs"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "completion_message"
                ],
                "title": "Chat completion response."
            },
            "ChatCompletionResponseEvent": {
                "type": "object",
                "properties": {
                    "event_type": {
                        "$ref": "#/components/schemas/ChatCompletionResponseEventType"
                    },
                    "delta": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ToolCallDelta"
                            }
                        ]
                    },
                    "logprobs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TokenLogProbs"
                        }
                    },
                    "stop_reason": {
                        "$ref": "#/components/schemas/StopReason"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event_type",
                    "delta"
                ],
                "title": "Chat completion response event."
            },
            "ChatCompletionResponseEventType": {
                "type": "string",
                "enum": [
                    "start",
                    "complete",
                    "progress"
                ]
            },
            "ChatCompletionResponseStreamChunk": {
                "type": "object",
                "properties": {
                    "event": {
                        "$ref": "#/components/schemas/ChatCompletionResponseEvent"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event"
                ],
                "title": "SSE-stream of these events."
            },
            "TokenLogProbs": {
                "type": "object",
                "properties": {
                    "logprobs_by_token": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "number"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "logprobs_by_token"
                ]
            },
            "ToolCallDelta": {
                "type": "object",
                "properties": {
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ToolCall"
                            }
                        ]
                    },
                    "parse_status": {
                        "$ref": "#/components/schemas/ToolCallParseStatus"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "content",
                    "parse_status"
                ]
            },
            "ToolCallParseStatus": {
                "type": "string",
                "enum": [
                    "started",
                    "in_progress",
                    "failure",
                    "success"
                ]
            },
            "CompletionRequest": {
                "type": "object",
                "properties": {
                    "model": {
                        "type": "string"
                    },
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "sampling_params": {
                        "$ref": "#/components/schemas/SamplingParams"
                    },
                    "response_format": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "json_schema",
                                        "default": "json_schema"
                                    },
                                    "json_schema": {
                                        "type": "object",
                                        "additionalProperties": {
                                            "oneOf": [
                                                {
                                                    "type": "null"
                                                },
                                                {
                                                    "type": "boolean"
                                                },
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "array"
                                                },
                                                {
                                                    "type": "object"
                                                }
                                            ]
                                        }
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type",
                                    "json_schema"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "grammar",
                                        "default": "grammar"
                                    },
                                    "bnf": {
                                        "type": "object",
                                        "additionalProperties": {
                                            "oneOf": [
                                                {
                                                    "type": "null"
                                                },
                                                {
                                                    "type": "boolean"
                                                },
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "array"
                                                },
                                                {
                                                    "type": "object"
                                                }
                                            ]
                                        }
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type",
                                    "bnf"
                                ]
                            }
                        ]
                    },
                    "stream": {
                        "type": "boolean"
                    },
                    "logprobs": {
                        "type": "object",
                        "properties": {
                            "top_k": {
                                "type": "integer",
                                "default": 0
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "additionalProperties": false,
                "required": [
                    "model",
                    "content"
                ]
            },
            "CompletionResponse": {
                "type": "object",
                "properties": {
                    "content": {
                        "type": "string"
                    },
                    "stop_reason": {
                        "$ref": "#/components/schemas/StopReason"
                    },
                    "logprobs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TokenLogProbs"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "content",
                    "stop_reason"
                ],
                "title": "Completion response."
            },
            "CompletionResponseStreamChunk": {
                "type": "object",
                "properties": {
                    "delta": {
                        "type": "string"
                    },
                    "stop_reason": {
                        "$ref": "#/components/schemas/StopReason"
                    },
                    "logprobs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TokenLogProbs"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "delta"
                ],
                "title": "streamed completion response."
            },
            "AgentConfig": {
                "type": "object",
                "properties": {
                    "sampling_params": {
                        "$ref": "#/components/schemas/SamplingParams"
                    },
                    "input_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "output_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "tools": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/SearchToolDefinition"
                                },
                                {
                                    "$ref": "#/components/schemas/WolframAlphaToolDefinition"
                                },
                                {
                                    "$ref": "#/components/schemas/PhotogenToolDefinition"
                                },
                                {
                                    "$ref": "#/components/schemas/CodeInterpreterToolDefinition"
                                },
                                {
                                    "$ref": "#/components/schemas/FunctionCallToolDefinition"
                                },
                                {
                                    "$ref": "#/components/schemas/MemoryToolDefinition"
                                }
                            ]
                        }
                    },
                    "tool_choice": {
                        "$ref": "#/components/schemas/ToolChoice",
                        "default": "auto"
                    },
                    "tool_prompt_format": {
                        "$ref": "#/components/schemas/ToolPromptFormat",
                        "default": "json"
                    },
                    "max_infer_iters": {
                        "type": "integer",
                        "default": 10
                    },
                    "model": {
                        "type": "string"
                    },
                    "instructions": {
                        "type": "string"
                    },
                    "enable_session_persistence": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "max_infer_iters",
                    "model",
                    "instructions",
                    "enable_session_persistence"
                ]
            },
            "CodeInterpreterToolDefinition": {
                "type": "object",
                "properties": {
                    "input_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "output_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "code_interpreter",
                        "default": "code_interpreter"
                    },
                    "enable_inline_code_execution": {
                        "type": "boolean",
                        "default": true
                    },
                    "remote_execution": {
                        "$ref": "#/components/schemas/RestAPIExecutionConfig"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "enable_inline_code_execution"
                ]
            },
            "FunctionCallToolDefinition": {
                "type": "object",
                "properties": {
                    "input_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "output_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "function_call",
                        "default": "function_call"
                    },
                    "function_name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "parameters": {
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/ToolParamDefinition"
                        }
                    },
                    "remote_execution": {
                        "$ref": "#/components/schemas/RestAPIExecutionConfig"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "function_name",
                    "description",
                    "parameters"
                ]
            },
            "MemoryToolDefinition": {
                "type": "object",
                "properties": {
                    "input_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "output_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "memory",
                        "default": "memory"
                    },
                    "memory_bank_configs": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "type": "object",
                                    "properties": {
                                        "bank_id": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string",
                                            "const": "vector",
                                            "default": "vector"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "bank_id",
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "bank_id": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string",
                                            "const": "keyvalue",
                                            "default": "keyvalue"
                                        },
                                        "keys": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "bank_id",
                                        "type",
                                        "keys"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "bank_id": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string",
                                            "const": "keyword",
                                            "default": "keyword"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "bank_id",
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "bank_id": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string",
                                            "const": "graph",
                                            "default": "graph"
                                        },
                                        "entities": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "bank_id",
                                        "type",
                                        "entities"
                                    ]
                                }
                            ]
                        }
                    },
                    "query_generator_config": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "default",
                                        "default": "default"
                                    },
                                    "sep": {
                                        "type": "string",
                                        "default": " "
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type",
                                    "sep"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "llm",
                                        "default": "llm"
                                    },
                                    "model": {
                                        "type": "string"
                                    },
                                    "template": {
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type",
                                    "model",
                                    "template"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "custom",
                                        "default": "custom"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            }
                        ]
                    },
                    "max_tokens_in_context": {
                        "type": "integer",
                        "default": 4096
                    },
                    "max_chunks": {
                        "type": "integer",
                        "default": 10
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "memory_bank_configs",
                    "query_generator_config",
                    "max_tokens_in_context",
                    "max_chunks"
                ]
            },
            "PhotogenToolDefinition": {
                "type": "object",
                "properties": {
                    "input_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "output_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "photogen",
                        "default": "photogen"
                    },
                    "remote_execution": {
                        "$ref": "#/components/schemas/RestAPIExecutionConfig"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type"
                ]
            },
            "RestAPIExecutionConfig": {
                "type": "object",
                "properties": {
                    "url": {
                        "$ref": "#/components/schemas/URL"
                    },
                    "method": {
                        "$ref": "#/components/schemas/RestAPIMethod"
                    },
                    "params": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "headers": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "body": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "url",
                    "method"
                ]
            },
            "RestAPIMethod": {
                "type": "string",
                "enum": [
                    "GET",
                    "POST",
                    "PUT",
                    "DELETE"
                ]
            },
            "SearchToolDefinition": {
                "type": "object",
                "properties": {
                    "input_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "output_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "brave_search",
                        "default": "brave_search"
                    },
                    "api_key": {
                        "type": "string"
                    },
                    "engine": {
                        "type": "string",
                        "enum": [
                            "bing",
                            "brave"
                        ],
                        "default": "brave"
                    },
                    "remote_execution": {
                        "$ref": "#/components/schemas/RestAPIExecutionConfig"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "api_key",
                    "engine"
                ]
            },
            "WolframAlphaToolDefinition": {
                "type": "object",
                "properties": {
                    "input_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "output_shields": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "wolfram_alpha",
                        "default": "wolfram_alpha"
                    },
                    "api_key": {
                        "type": "string"
                    },
                    "remote_execution": {
                        "$ref": "#/components/schemas/RestAPIExecutionConfig"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "api_key"
                ]
            },
            "CreateAgentRequest": {
                "type": "object",
                "properties": {
                    "agent_config": {
                        "$ref": "#/components/schemas/AgentConfig"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "agent_config"
                ]
            },
            "AgentCreateResponse": {
                "type": "object",
                "properties": {
                    "agent_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "agent_id"
                ]
            },
            "CreateAgentSessionRequest": {
                "type": "object",
                "properties": {
                    "agent_id": {
                        "type": "string"
                    },
                    "session_name": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "agent_id",
                    "session_name"
                ]
            },
            "AgentSessionCreateResponse": {
                "type": "object",
                "properties": {
                    "session_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "session_id"
                ]
            },
            "Attachment": {
                "type": "object",
                "properties": {
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            },
                            {
                                "$ref": "#/components/schemas/URL"
                            }
                        ]
                    },
                    "mime_type": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "content",
                    "mime_type"
                ]
            },
            "CreateAgentTurnRequest": {
                "type": "object",
                "properties": {
                    "agent_id": {
                        "type": "string"
                    },
                    "session_id": {
                        "type": "string"
                    },
                    "messages": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/UserMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/ToolResponseMessage"
                                }
                            ]
                        }
                    },
                    "attachments": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Attachment"
                        }
                    },
                    "stream": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "agent_id",
                    "session_id",
                    "messages"
                ]
            },
            "AgentTurnResponseEvent": {
                "type": "object",
                "properties": {
                    "payload": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/AgentTurnResponseStepStartPayload"
                            },
                            {
                                "$ref": "#/components/schemas/AgentTurnResponseStepProgressPayload"
                            },
                            {
                                "$ref": "#/components/schemas/AgentTurnResponseStepCompletePayload"
                            },
                            {
                                "$ref": "#/components/schemas/AgentTurnResponseTurnStartPayload"
                            },
                            {
                                "$ref": "#/components/schemas/AgentTurnResponseTurnCompletePayload"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "payload"
                ],
                "title": "Streamed agent execution response."
            },
            "AgentTurnResponseStepCompletePayload": {
                "type": "object",
                "properties": {
                    "event_type": {
                        "type": "string",
                        "const": "step_complete",
                        "default": "step_complete"
                    },
                    "step_type": {
                        "type": "string",
                        "enum": [
                            "inference",
                            "tool_execution",
                            "shield_call",
                            "memory_retrieval"
                        ]
                    },
                    "step_details": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/InferenceStep"
                            },
                            {
                                "$ref": "#/components/schemas/ToolExecutionStep"
                            },
                            {
                                "$ref": "#/components/schemas/ShieldCallStep"
                            },
                            {
                                "$ref": "#/components/schemas/MemoryRetrievalStep"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event_type",
                    "step_type",
                    "step_details"
                ]
            },
            "AgentTurnResponseStepProgressPayload": {
                "type": "object",
                "properties": {
                    "event_type": {
                        "type": "string",
                        "const": "step_progress",
                        "default": "step_progress"
                    },
                    "step_type": {
                        "type": "string",
                        "enum": [
                            "inference",
                            "tool_execution",
                            "shield_call",
                            "memory_retrieval"
                        ]
                    },
                    "step_id": {
                        "type": "string"
                    },
                    "model_response_text_delta": {
                        "type": "string"
                    },
                    "tool_call_delta": {
                        "$ref": "#/components/schemas/ToolCallDelta"
                    },
                    "tool_response_text_delta": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event_type",
                    "step_type",
                    "step_id"
                ]
            },
            "AgentTurnResponseStepStartPayload": {
                "type": "object",
                "properties": {
                    "event_type": {
                        "type": "string",
                        "const": "step_start",
                        "default": "step_start"
                    },
                    "step_type": {
                        "type": "string",
                        "enum": [
                            "inference",
                            "tool_execution",
                            "shield_call",
                            "memory_retrieval"
                        ]
                    },
                    "step_id": {
                        "type": "string"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event_type",
                    "step_type",
                    "step_id"
                ]
            },
            "AgentTurnResponseStreamChunk": {
                "type": "object",
                "properties": {
                    "event": {
                        "$ref": "#/components/schemas/AgentTurnResponseEvent"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event"
                ],
                "title": "streamed agent turn completion response."
            },
            "AgentTurnResponseTurnCompletePayload": {
                "type": "object",
                "properties": {
                    "event_type": {
                        "type": "string",
                        "const": "turn_complete",
                        "default": "turn_complete"
                    },
                    "turn": {
                        "$ref": "#/components/schemas/Turn"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event_type",
                    "turn"
                ]
            },
            "AgentTurnResponseTurnStartPayload": {
                "type": "object",
                "properties": {
                    "event_type": {
                        "type": "string",
                        "const": "turn_start",
                        "default": "turn_start"
                    },
                    "turn_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event_type",
                    "turn_id"
                ]
            },
            "InferenceStep": {
                "type": "object",
                "properties": {
                    "turn_id": {
                        "type": "string"
                    },
                    "step_id": {
                        "type": "string"
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "completed_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "step_type": {
                        "type": "string",
                        "const": "inference",
                        "default": "inference"
                    },
                    "model_response": {
                        "$ref": "#/components/schemas/CompletionMessage"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "turn_id",
                    "step_id",
                    "step_type",
                    "model_response"
                ]
            },
            "MemoryRetrievalStep": {
                "type": "object",
                "properties": {
                    "turn_id": {
                        "type": "string"
                    },
                    "step_id": {
                        "type": "string"
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "completed_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "step_type": {
                        "type": "string",
                        "const": "memory_retrieval",
                        "default": "memory_retrieval"
                    },
                    "memory_bank_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "inserted_context": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "turn_id",
                    "step_id",
                    "step_type",
                    "memory_bank_ids",
                    "inserted_context"
                ]
            },
            "SafetyViolation": {
                "type": "object",
                "properties": {
                    "violation_level": {
                        "$ref": "#/components/schemas/ViolationLevel"
                    },
                    "user_message": {
                        "type": "string"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "violation_level",
                    "metadata"
                ]
            },
            "ShieldCallStep": {
                "type": "object",
                "properties": {
                    "turn_id": {
                        "type": "string"
                    },
                    "step_id": {
                        "type": "string"
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "completed_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "step_type": {
                        "type": "string",
                        "const": "shield_call",
                        "default": "shield_call"
                    },
                    "violation": {
                        "$ref": "#/components/schemas/SafetyViolation"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "turn_id",
                    "step_id",
                    "step_type"
                ]
            },
            "ToolExecutionStep": {
                "type": "object",
                "properties": {
                    "turn_id": {
                        "type": "string"
                    },
                    "step_id": {
                        "type": "string"
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "completed_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "step_type": {
                        "type": "string",
                        "const": "tool_execution",
                        "default": "tool_execution"
                    },
                    "tool_calls": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ToolCall"
                        }
                    },
                    "tool_responses": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ToolResponse"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "turn_id",
                    "step_id",
                    "step_type",
                    "tool_calls",
                    "tool_responses"
                ]
            },
            "ToolResponse": {
                "type": "object",
                "properties": {
                    "call_id": {
                        "type": "string"
                    },
                    "tool_name": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/BuiltinTool"
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "call_id",
                    "tool_name",
                    "content"
                ]
            },
            "Turn": {
                "type": "object",
                "properties": {
                    "turn_id": {
                        "type": "string"
                    },
                    "session_id": {
                        "type": "string"
                    },
                    "input_messages": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/UserMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/ToolResponseMessage"
                                }
                            ]
                        }
                    },
                    "steps": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/InferenceStep"
                                },
                                {
                                    "$ref": "#/components/schemas/ToolExecutionStep"
                                },
                                {
                                    "$ref": "#/components/schemas/ShieldCallStep"
                                },
                                {
                                    "$ref": "#/components/schemas/MemoryRetrievalStep"
                                }
                            ]
                        }
                    },
                    "output_message": {
                        "$ref": "#/components/schemas/CompletionMessage"
                    },
                    "output_attachments": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Attachment"
                        }
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "completed_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "turn_id",
                    "session_id",
                    "input_messages",
                    "steps",
                    "output_message",
                    "output_attachments",
                    "started_at"
                ],
                "title": "A single turn in an interaction with an Agentic System."
            },
            "ViolationLevel": {
                "type": "string",
                "enum": [
                    "info",
                    "warn",
                    "error"
                ]
            },
            "DeleteAgentsRequest": {
                "type": "object",
                "properties": {
                    "agent_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "agent_id"
                ]
            },
            "DeleteAgentsSessionRequest": {
                "type": "object",
                "properties": {
                    "agent_id": {
                        "type": "string"
                    },
                    "session_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "agent_id",
                    "session_id"
                ]
            },
            "EmbeddingsRequest": {
                "type": "object",
                "properties": {
                    "model": {
                        "type": "string"
                    },
                    "contents": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "$ref": "#/components/schemas/ImageMedia"
                                },
                                {
                                    "type": "array",
                                    "items": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "$ref": "#/components/schemas/ImageMedia"
                                            }
                                        ]
                                    }
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "model",
                    "contents"
                ]
            },
            "EmbeddingsResponse": {
                "type": "object",
                "properties": {
                    "embeddings": {
                        "type": "array",
                        "items": {
                            "type": "array",
                            "items": {
                                "type": "number"
                            }
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "embeddings"
                ]
            },
            "AgentCandidate": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "const": "agent",
                        "default": "agent"
                    },
                    "config": {
                        "$ref": "#/components/schemas/AgentConfig"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "config"
                ]
            },
            "ModelCandidate": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "const": "model",
                        "default": "model"
                    },
                    "model": {
                        "type": "string"
                    },
                    "sampling_params": {
                        "$ref": "#/components/schemas/SamplingParams"
                    },
                    "system_message": {
                        "$ref": "#/components/schemas/SystemMessage"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "model",
                    "sampling_params"
                ]
            },
            "EvaluateRequest": {
                "type": "object",
                "properties": {
                    "input_rows": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {
                                "oneOf": [
                                    {
                                        "type": "null"
                                    },
                                    {
                                        "type": "boolean"
                                    },
                                    {
                                        "type": "number"
                                    },
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "array"
                                    },
                                    {
                                        "type": "object"
                                    }
                                ]
                            }
                        }
                    },
                    "candidate": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/ModelCandidate"
                            },
                            {
                                "$ref": "#/components/schemas/AgentCandidate"
                            }
                        ]
                    },
                    "scoring_functions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "input_rows",
                    "candidate",
                    "scoring_functions"
                ]
            },
            "EvaluateResponse": {
                "type": "object",
                "properties": {
                    "generations": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {
                                "oneOf": [
                                    {
                                        "type": "null"
                                    },
                                    {
                                        "type": "boolean"
                                    },
                                    {
                                        "type": "number"
                                    },
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "array"
                                    },
                                    {
                                        "type": "object"
                                    }
                                ]
                            }
                        }
                    },
                    "scores": {
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/ScoringResult"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "generations",
                    "scores"
                ]
            },
            "ScoringResult": {
                "type": "object",
                "properties": {
                    "score_rows": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {
                                "oneOf": [
                                    {
                                        "type": "null"
                                    },
                                    {
                                        "type": "boolean"
                                    },
                                    {
                                        "type": "number"
                                    },
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "array"
                                    },
                                    {
                                        "type": "object"
                                    }
                                ]
                            }
                        }
                    },
                    "aggregated_results": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "score_rows",
                    "aggregated_results"
                ]
            },
            "EvaluateBatchRequest": {
                "type": "object",
                "properties": {
                    "dataset_id": {
                        "type": "string"
                    },
                    "candidate": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/ModelCandidate"
                            },
                            {
                                "$ref": "#/components/schemas/AgentCandidate"
                            }
                        ]
                    },
                    "scoring_functions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "dataset_id",
                    "candidate",
                    "scoring_functions"
                ]
            },
            "Job": {
                "type": "object",
                "properties": {
                    "job_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_id"
                ]
            },
            "GetAgentsSessionRequest": {
                "type": "object",
                "properties": {
                    "turn_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "additionalProperties": false
            },
            "GraphMemoryBankDef": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string"
                    },
                    "provider_id": {
                        "type": "string",
                        "default": ""
                    },
                    "type": {
                        "type": "string",
                        "const": "graph",
                        "default": "graph"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "identifier",
                    "provider_id",
                    "type"
                ]
            },
            "KeyValueMemoryBankDef": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string"
                    },
                    "provider_id": {
                        "type": "string",
                        "default": ""
                    },
                    "type": {
                        "type": "string",
                        "const": "keyvalue",
                        "default": "keyvalue"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "identifier",
                    "provider_id",
                    "type"
                ]
            },
            "KeywordMemoryBankDef": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string"
                    },
                    "provider_id": {
                        "type": "string",
                        "default": ""
                    },
                    "type": {
                        "type": "string",
                        "const": "keyword",
                        "default": "keyword"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "identifier",
                    "provider_id",
                    "type"
                ]
            },
            "Session": {
                "type": "object",
                "properties": {
                    "session_id": {
                        "type": "string"
                    },
                    "session_name": {
                        "type": "string"
                    },
                    "turns": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Turn"
                        }
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "memory_bank": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/VectorMemoryBankDef"
                            },
                            {
                                "$ref": "#/components/schemas/KeyValueMemoryBankDef"
                            },
                            {
                                "$ref": "#/components/schemas/KeywordMemoryBankDef"
                            },
                            {
                                "$ref": "#/components/schemas/GraphMemoryBankDef"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "session_id",
                    "session_name",
                    "turns",
                    "started_at"
                ],
                "title": "A single session of an interaction with an Agentic System."
            },
            "VectorMemoryBankDef": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string"
                    },
                    "provider_id": {
                        "type": "string",
                        "default": ""
                    },
                    "type": {
                        "type": "string",
                        "const": "vector",
                        "default": "vector"
                    },
                    "embedding_model": {
                        "type": "string"
                    },
                    "chunk_size_in_tokens": {
                        "type": "integer"
                    },
                    "overlap_size_in_tokens": {
                        "type": "integer"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "identifier",
                    "provider_id",
                    "type",
                    "embedding_model",
                    "chunk_size_in_tokens"
                ]
            },
            "AgentStepResponse": {
                "type": "object",
                "properties": {
                    "step": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/InferenceStep"
                            },
                            {
                                "$ref": "#/components/schemas/ToolExecutionStep"
                            },
                            {
                                "$ref": "#/components/schemas/ShieldCallStep"
                            },
                            {
                                "$ref": "#/components/schemas/MemoryRetrievalStep"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "step"
                ]
            },
            "DatasetDefWithProvider": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string"
                    },
                    "dataset_schema": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "string",
                                            "default": "string"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "number",
                                            "default": "number"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "boolean",
                                            "default": "boolean"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "array",
                                            "default": "array"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "object",
                                            "default": "object"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "json",
                                            "default": "json"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "union",
                                            "default": "union"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "chat_completion_input",
                                            "default": "chat_completion_input"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "completion_input",
                                            "default": "completion_input"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "const": "agent_turn_input",
                                            "default": "agent_turn_input"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                }
                            ]
                        }
                    },
                    "url": {
                        "$ref": "#/components/schemas/URL"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "provider_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "identifier",
                    "dataset_schema",
                    "url",
                    "metadata",
                    "provider_id"
                ]
            },
            "ModelDefWithProvider": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string"
                    },
                    "llama_model": {
                        "type": "string"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "provider_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "identifier",
                    "llama_model",
                    "metadata",
                    "provider_id"
                ]
            },
            "PaginatedRowsResult": {
                "type": "object",
                "properties": {
                    "rows": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {
                                "oneOf": [
                                    {
                                        "type": "null"
                                    },
                                    {
                                        "type": "boolean"
                                    },
                                    {
                                        "type": "number"
                                    },
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "array"
                                    },
                                    {
                                        "type": "object"
                                    }
                                ]
                            }
                        }
                    },
                    "total_count": {
                        "type": "integer"
                    },
                    "next_page_token": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "rows",
                    "total_count"
                ]
            },
            "Parameter": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "string",
                                        "default": "string"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "number",
                                        "default": "number"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "boolean",
                                        "default": "boolean"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "array",
                                        "default": "array"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "object",
                                        "default": "object"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "json",
                                        "default": "json"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "union",
                                        "default": "union"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "chat_completion_input",
                                        "default": "chat_completion_input"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "completion_input",
                                        "default": "completion_input"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "agent_turn_input",
                                        "default": "agent_turn_input"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            }
                        ]
                    },
                    "description": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "name",
                    "type"
                ]
            },
            "ScoringFnDefWithProvider": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "parameters": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Parameter"
                        }
                    },
                    "return_type": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "string",
                                        "default": "string"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "number",
                                        "default": "number"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "boolean",
                                        "default": "boolean"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "array",
                                        "default": "array"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "object",
                                        "default": "object"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "json",
                                        "default": "json"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "union",
                                        "default": "union"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "chat_completion_input",
                                        "default": "chat_completion_input"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "completion_input",
                                        "default": "completion_input"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "agent_turn_input",
                                        "default": "agent_turn_input"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type"
                                ]
                            }
                        ]
                    },
                    "context": {
                        "type": "object",
                        "properties": {
                            "judge_model": {
                                "type": "string"
                            },
                            "prompt_template": {
                                "type": "string"
                            },
                            "judge_score_regex": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "judge_model"
                        ]
                    },
                    "provider_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "identifier",
                    "metadata",
                    "parameters",
                    "return_type",
                    "provider_id"
                ]
            },
            "ShieldDefWithProvider": {
                "type": "object",
                "properties": {
                    "identifier": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "params": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "provider_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "identifier",
                    "type",
                    "params",
                    "provider_id"
                ]
            },
            "Trace": {
                "type": "object",
                "properties": {
                    "trace_id": {
                        "type": "string"
                    },
                    "root_span_id": {
                        "type": "string"
                    },
                    "start_time": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "end_time": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "trace_id",
                    "root_span_id",
                    "start_time"
                ]
            },
            "Checkpoint": {
                "description": "Checkpoint created during training runs"
            },
            "PostTrainingJobArtifactsResponse": {
                "type": "object",
                "properties": {
                    "job_uuid": {
                        "type": "string"
                    },
                    "checkpoints": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Checkpoint"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_uuid",
                    "checkpoints"
                ],
                "title": "Artifacts of a finetuning job."
            },
            "PostTrainingJobLogStream": {
                "type": "object",
                "properties": {
                    "job_uuid": {
                        "type": "string"
                    },
                    "log_lines": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_uuid",
                    "log_lines"
                ],
                "title": "Stream of logs from a finetuning job."
            },
            "PostTrainingJobStatus": {
                "type": "string",
                "enum": [
                    "running",
                    "completed",
                    "failed",
                    "scheduled"
                ]
            },
            "PostTrainingJobStatusResponse": {
                "type": "object",
                "properties": {
                    "job_uuid": {
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/PostTrainingJobStatus"
                    },
                    "scheduled_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "completed_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "resources_allocated": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "checkpoints": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Checkpoint"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_uuid",
                    "status",
                    "checkpoints"
                ],
                "title": "Status of a finetuning job."
            },
            "PostTrainingJob": {
                "type": "object",
                "properties": {
                    "job_uuid": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_uuid"
                ]
            },
            "HealthInfo": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "status"
                ]
            },
            "MemoryBankDocument": {
                "type": "object",
                "properties": {
                    "document_id": {
                        "type": "string"
                    },
                    "content": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            },
                            {
                                "$ref": "#/components/schemas/URL"
                            }
                        ]
                    },
                    "mime_type": {
                        "type": "string"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "document_id",
                    "content",
                    "metadata"
                ]
            },
            "InsertDocumentsRequest": {
                "type": "object",
                "properties": {
                    "bank_id": {
                        "type": "string"
                    },
                    "documents": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MemoryBankDocument"
                        }
                    },
                    "ttl_seconds": {
                        "type": "integer"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "bank_id",
                    "documents"
                ]
            },
            "JobCancelRequest": {
                "type": "object",
                "properties": {
                    "job_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_id"
                ]
            },
            "JobStatus": {
                "type": "string",
                "enum": [
                    "completed",
                    "in_progress"
                ]
            },
            "ProviderInfo": {
                "type": "object",
                "properties": {
                    "provider_id": {
                        "type": "string"
                    },
                    "provider_type": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "provider_id",
                    "provider_type"
                ]
            },
            "RouteInfo": {
                "type": "object",
                "properties": {
                    "route": {
                        "type": "string"
                    },
                    "method": {
                        "type": "string"
                    },
                    "provider_types": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "route",
                    "method",
                    "provider_types"
                ]
            },
            "LogSeverity": {
                "type": "string",
                "enum": [
                    "verbose",
                    "debug",
                    "info",
                    "warn",
                    "error",
                    "critical"
                ]
            },
            "MetricEvent": {
                "type": "object",
                "properties": {
                    "trace_id": {
                        "type": "string"
                    },
                    "span_id": {
                        "type": "string"
                    },
                    "timestamp": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "attributes": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "metric",
                        "default": "metric"
                    },
                    "metric": {
                        "type": "string"
                    },
                    "value": {
                        "oneOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "number"
                            }
                        ]
                    },
                    "unit": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "trace_id",
                    "span_id",
                    "timestamp",
                    "type",
                    "metric",
                    "value",
                    "unit"
                ]
            },
            "SpanEndPayload": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "const": "span_end",
                        "default": "span_end"
                    },
                    "status": {
                        "$ref": "#/components/schemas/SpanStatus"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "status"
                ]
            },
            "SpanStartPayload": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "const": "span_start",
                        "default": "span_start"
                    },
                    "name": {
                        "type": "string"
                    },
                    "parent_span_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "name"
                ]
            },
            "SpanStatus": {
                "type": "string",
                "enum": [
                    "ok",
                    "error"
                ]
            },
            "StructuredLogEvent": {
                "type": "object",
                "properties": {
                    "trace_id": {
                        "type": "string"
                    },
                    "span_id": {
                        "type": "string"
                    },
                    "timestamp": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "attributes": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "structured_log",
                        "default": "structured_log"
                    },
                    "payload": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/SpanStartPayload"
                            },
                            {
                                "$ref": "#/components/schemas/SpanEndPayload"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "trace_id",
                    "span_id",
                    "timestamp",
                    "type",
                    "payload"
                ]
            },
            "UnstructuredLogEvent": {
                "type": "object",
                "properties": {
                    "trace_id": {
                        "type": "string"
                    },
                    "span_id": {
                        "type": "string"
                    },
                    "timestamp": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "attributes": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "type": {
                        "type": "string",
                        "const": "unstructured_log",
                        "default": "unstructured_log"
                    },
                    "message": {
                        "type": "string"
                    },
                    "severity": {
                        "$ref": "#/components/schemas/LogSeverity"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "trace_id",
                    "span_id",
                    "timestamp",
                    "type",
                    "message",
                    "severity"
                ]
            },
            "LogEventRequest": {
                "type": "object",
                "properties": {
                    "event": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/UnstructuredLogEvent"
                            },
                            {
                                "$ref": "#/components/schemas/MetricEvent"
                            },
                            {
                                "$ref": "#/components/schemas/StructuredLogEvent"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "event"
                ]
            },
            "DPOAlignmentConfig": {
                "type": "object",
                "properties": {
                    "reward_scale": {
                        "type": "number"
                    },
                    "reward_clip": {
                        "type": "number"
                    },
                    "epsilon": {
                        "type": "number"
                    },
                    "gamma": {
                        "type": "number"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "reward_scale",
                    "reward_clip",
                    "epsilon",
                    "gamma"
                ]
            },
            "OptimizerConfig": {
                "type": "object",
                "properties": {
                    "optimizer_type": {
                        "type": "string",
                        "enum": [
                            "adam",
                            "adamw",
                            "sgd"
                        ]
                    },
                    "lr": {
                        "type": "number"
                    },
                    "lr_min": {
                        "type": "number"
                    },
                    "weight_decay": {
                        "type": "number"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "optimizer_type",
                    "lr",
                    "lr_min",
                    "weight_decay"
                ]
            },
            "RLHFAlgorithm": {
                "type": "string",
                "enum": [
                    "dpo"
                ]
            },
            "TrainingConfig": {
                "type": "object",
                "properties": {
                    "n_epochs": {
                        "type": "integer"
                    },
                    "batch_size": {
                        "type": "integer"
                    },
                    "shuffle": {
                        "type": "boolean"
                    },
                    "n_iters": {
                        "type": "integer"
                    },
                    "enable_activation_checkpointing": {
                        "type": "boolean"
                    },
                    "memory_efficient_fsdp_wrap": {
                        "type": "boolean"
                    },
                    "fsdp_cpu_offload": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "n_epochs",
                    "batch_size",
                    "shuffle",
                    "n_iters",
                    "enable_activation_checkpointing",
                    "memory_efficient_fsdp_wrap",
                    "fsdp_cpu_offload"
                ]
            },
            "PreferenceOptimizeRequest": {
                "type": "object",
                "properties": {
                    "job_uuid": {
                        "type": "string"
                    },
                    "finetuned_model": {
                        "$ref": "#/components/schemas/URL"
                    },
                    "dataset_id": {
                        "type": "string"
                    },
                    "validation_dataset_id": {
                        "type": "string"
                    },
                    "algorithm": {
                        "$ref": "#/components/schemas/RLHFAlgorithm"
                    },
                    "algorithm_config": {
                        "$ref": "#/components/schemas/DPOAlignmentConfig"
                    },
                    "optimizer_config": {
                        "$ref": "#/components/schemas/OptimizerConfig"
                    },
                    "training_config": {
                        "$ref": "#/components/schemas/TrainingConfig"
                    },
                    "hyperparam_search_config": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "logger_config": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_uuid",
                    "finetuned_model",
                    "dataset_id",
                    "validation_dataset_id",
                    "algorithm",
                    "algorithm_config",
                    "optimizer_config",
                    "training_config",
                    "hyperparam_search_config",
                    "logger_config"
                ]
            },
            "QueryDocumentsRequest": {
                "type": "object",
                "properties": {
                    "bank_id": {
                        "type": "string"
                    },
                    "query": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "$ref": "#/components/schemas/ImageMedia"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "params": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "bank_id",
                    "query"
                ]
            },
            "QueryDocumentsResponse": {
                "type": "object",
                "properties": {
                    "chunks": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "content": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ImageMedia"
                                        },
                                        {
                                            "type": "array",
                                            "items": {
                                                "oneOf": [
                                                    {
                                                        "type": "string"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/ImageMedia"
                                                    }
                                                ]
                                            }
                                        }
                                    ]
                                },
                                "token_count": {
                                    "type": "integer"
                                },
                                "document_id": {
                                    "type": "string"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "content",
                                "token_count",
                                "document_id"
                            ]
                        }
                    },
                    "scores": {
                        "type": "array",
                        "items": {
                            "type": "number"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "chunks",
                    "scores"
                ]
            },
            "RegisterDatasetRequest": {
                "type": "object",
                "properties": {
                    "dataset_def": {
                        "$ref": "#/components/schemas/DatasetDefWithProvider"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "dataset_def"
                ]
            },
            "RegisterMemoryBankRequest": {
                "type": "object",
                "properties": {
                    "memory_bank": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/VectorMemoryBankDef"
                            },
                            {
                                "$ref": "#/components/schemas/KeyValueMemoryBankDef"
                            },
                            {
                                "$ref": "#/components/schemas/KeywordMemoryBankDef"
                            },
                            {
                                "$ref": "#/components/schemas/GraphMemoryBankDef"
                            }
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "memory_bank"
                ]
            },
            "RegisterModelRequest": {
                "type": "object",
                "properties": {
                    "model": {
                        "$ref": "#/components/schemas/ModelDefWithProvider"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "model"
                ]
            },
            "RegisterScoringFunctionRequest": {
                "type": "object",
                "properties": {
                    "function_def": {
                        "$ref": "#/components/schemas/ScoringFnDefWithProvider"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "function_def"
                ]
            },
            "RegisterShieldRequest": {
                "type": "object",
                "properties": {
                    "shield": {
                        "$ref": "#/components/schemas/ShieldDefWithProvider"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "shield"
                ]
            },
            "RunShieldRequest": {
                "type": "object",
                "properties": {
                    "shield_type": {
                        "type": "string"
                    },
                    "messages": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/UserMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/SystemMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/ToolResponseMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/CompletionMessage"
                                }
                            ]
                        }
                    },
                    "params": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "shield_type",
                    "messages",
                    "params"
                ]
            },
            "RunShieldResponse": {
                "type": "object",
                "properties": {
                    "violation": {
                        "$ref": "#/components/schemas/SafetyViolation"
                    }
                },
                "additionalProperties": false
            },
            "ScoreRequest": {
                "type": "object",
                "properties": {
                    "input_rows": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {
                                "oneOf": [
                                    {
                                        "type": "null"
                                    },
                                    {
                                        "type": "boolean"
                                    },
                                    {
                                        "type": "number"
                                    },
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "array"
                                    },
                                    {
                                        "type": "object"
                                    }
                                ]
                            }
                        }
                    },
                    "scoring_functions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "input_rows",
                    "scoring_functions"
                ]
            },
            "ScoreResponse": {
                "type": "object",
                "properties": {
                    "results": {
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/ScoringResult"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "results"
                ]
            },
            "ScoreBatchRequest": {
                "type": "object",
                "properties": {
                    "dataset_id": {
                        "type": "string"
                    },
                    "scoring_functions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "save_results_dataset": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "dataset_id",
                    "scoring_functions",
                    "save_results_dataset"
                ]
            },
            "ScoreBatchResponse": {
                "type": "object",
                "properties": {
                    "dataset_id": {
                        "type": "string"
                    },
                    "results": {
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/ScoringResult"
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "results"
                ]
            },
            "DoraFinetuningConfig": {
                "type": "object",
                "properties": {
                    "lora_attn_modules": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "apply_lora_to_mlp": {
                        "type": "boolean"
                    },
                    "apply_lora_to_output": {
                        "type": "boolean"
                    },
                    "rank": {
                        "type": "integer"
                    },
                    "alpha": {
                        "type": "integer"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "lora_attn_modules",
                    "apply_lora_to_mlp",
                    "apply_lora_to_output",
                    "rank",
                    "alpha"
                ]
            },
            "FinetuningAlgorithm": {
                "type": "string",
                "enum": [
                    "full",
                    "lora",
                    "qlora",
                    "dora"
                ]
            },
            "LoraFinetuningConfig": {
                "type": "object",
                "properties": {
                    "lora_attn_modules": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "apply_lora_to_mlp": {
                        "type": "boolean"
                    },
                    "apply_lora_to_output": {
                        "type": "boolean"
                    },
                    "rank": {
                        "type": "integer"
                    },
                    "alpha": {
                        "type": "integer"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "lora_attn_modules",
                    "apply_lora_to_mlp",
                    "apply_lora_to_output",
                    "rank",
                    "alpha"
                ]
            },
            "QLoraFinetuningConfig": {
                "type": "object",
                "properties": {
                    "lora_attn_modules": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "apply_lora_to_mlp": {
                        "type": "boolean"
                    },
                    "apply_lora_to_output": {
                        "type": "boolean"
                    },
                    "rank": {
                        "type": "integer"
                    },
                    "alpha": {
                        "type": "integer"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "lora_attn_modules",
                    "apply_lora_to_mlp",
                    "apply_lora_to_output",
                    "rank",
                    "alpha"
                ]
            },
            "SupervisedFineTuneRequest": {
                "type": "object",
                "properties": {
                    "job_uuid": {
                        "type": "string"
                    },
                    "model": {
                        "type": "string"
                    },
                    "dataset_id": {
                        "type": "string"
                    },
                    "validation_dataset_id": {
                        "type": "string"
                    },
                    "algorithm": {
                        "$ref": "#/components/schemas/FinetuningAlgorithm"
                    },
                    "algorithm_config": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/LoraFinetuningConfig"
                            },
                            {
                                "$ref": "#/components/schemas/QLoraFinetuningConfig"
                            },
                            {
                                "$ref": "#/components/schemas/DoraFinetuningConfig"
                            }
                        ]
                    },
                    "optimizer_config": {
                        "$ref": "#/components/schemas/OptimizerConfig"
                    },
                    "training_config": {
                        "$ref": "#/components/schemas/TrainingConfig"
                    },
                    "hyperparam_search_config": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "logger_config": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "job_uuid",
                    "model",
                    "dataset_id",
                    "validation_dataset_id",
                    "algorithm",
                    "algorithm_config",
                    "optimizer_config",
                    "training_config",
                    "hyperparam_search_config",
                    "logger_config"
                ]
            },
            "SyntheticDataGenerateRequest": {
                "type": "object",
                "properties": {
                    "dialogs": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/UserMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/SystemMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/ToolResponseMessage"
                                },
                                {
                                    "$ref": "#/components/schemas/CompletionMessage"
                                }
                            ]
                        }
                    },
                    "filtering_function": {
                        "type": "string",
                        "enum": [
                            "none",
                            "random",
                            "top_k",
                            "top_p",
                            "top_k_top_p",
                            "sigmoid"
                        ],
                        "title": "The type of filtering function."
                    },
                    "model": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "dialogs",
                    "filtering_function"
                ]
            },
            "SyntheticDataGenerationResponse": {
                "type": "object",
                "properties": {
                    "synthetic_data": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {
                                "oneOf": [
                                    {
                                        "type": "null"
                                    },
                                    {
                                        "type": "boolean"
                                    },
                                    {
                                        "type": "number"
                                    },
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "array"
                                    },
                                    {
                                        "type": "object"
                                    }
                                ]
                            }
                        }
                    },
                    "statistics": {
                        "type": "object",
                        "additionalProperties": {
                            "oneOf": [
                                {
                                    "type": "null"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "array"
                                },
                                {
                                    "type": "object"
                                }
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "synthetic_data"
                ],
                "title": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold."
            }
        },
        "responses": {}
    },
    "security": [
        {
            "Default": []
        }
    ],
    "tags": [
        {
            "name": "Memory"
        },
        {
            "name": "Inference"
        },
        {
            "name": "Eval"
        },
        {
            "name": "MemoryBanks"
        },
        {
            "name": "Models"
        },
        {
            "name": "BatchInference"
        },
        {
            "name": "PostTraining"
        },
        {
            "name": "Agents"
        },
        {
            "name": "Shields"
        },
        {
            "name": "Telemetry"
        },
        {
            "name": "Inspect"
        },
        {
            "name": "DatasetIO"
        },
        {
            "name": "SyntheticDataGeneration"
        },
        {
            "name": "Datasets"
        },
        {
            "name": "Scoring"
        },
        {
            "name": "ScoringFunctions"
        },
        {
            "name": "Safety"
        },
        {
            "name": "BuiltinTool",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/BuiltinTool\" />"
        },
        {
            "name": "CompletionMessage",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/CompletionMessage\" />"
        },
        {
            "name": "ImageMedia",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ImageMedia\" />"
        },
        {
            "name": "SamplingParams",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SamplingParams\" />"
        },
        {
            "name": "SamplingStrategy",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SamplingStrategy\" />"
        },
        {
            "name": "StopReason",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/StopReason\" />"
        },
        {
            "name": "SystemMessage",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SystemMessage\" />"
        },
        {
            "name": "ToolCall",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolCall\" />"
        },
        {
            "name": "ToolChoice",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolChoice\" />"
        },
        {
            "name": "ToolDefinition",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolDefinition\" />"
        },
        {
            "name": "ToolParamDefinition",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolParamDefinition\" />"
        },
        {
            "name": "ToolPromptFormat",
            "description": "This Enum refers to the prompt format for calling custom / zero shot tools\n\n`json` --\n    Refers to the json format for calling tools.\n    The json format takes the form like\n    {\n        \"type\": \"function\",\n        \"function\" : {\n            \"name\": \"function_name\",\n            \"description\": \"function_description\",\n            \"parameters\": {...}\n        }\n    }\n\n`function_tag` --\n    This is an example of how you could define\n    your own user defined format for making tool calls.\n    The function_tag format looks like this,\n    <function=function_name>(parameters)</function>\n\nThe detailed prompts for each of these formats are added to llama cli\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ToolPromptFormat\" />"
        },
        {
            "name": "ToolResponseMessage",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolResponseMessage\" />"
        },
        {
            "name": "URL",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/URL\" />"
        },
        {
            "name": "UserMessage",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/UserMessage\" />"
        },
        {
            "name": "BatchChatCompletionRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchChatCompletionRequest\" />"
        },
        {
            "name": "BatchChatCompletionResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchChatCompletionResponse\" />"
        },
        {
            "name": "BatchCompletionRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchCompletionRequest\" />"
        },
        {
            "name": "BatchCompletionResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchCompletionResponse\" />"
        },
        {
            "name": "CancelTrainingJobRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/CancelTrainingJobRequest\" />"
        },
        {
            "name": "ChatCompletionRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionRequest\" />"
        },
        {
            "name": "ChatCompletionResponse",
            "description": "Chat completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponse\" />"
        },
        {
            "name": "ChatCompletionResponseEvent",
            "description": "Chat completion response event.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponseEvent\" />"
        },
        {
            "name": "ChatCompletionResponseEventType",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponseEventType\" />"
        },
        {
            "name": "ChatCompletionResponseStreamChunk",
            "description": "SSE-stream of these events.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponseStreamChunk\" />"
        },
        {
            "name": "TokenLogProbs",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/TokenLogProbs\" />"
        },
        {
            "name": "ToolCallDelta",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolCallDelta\" />"
        },
        {
            "name": "ToolCallParseStatus",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolCallParseStatus\" />"
        },
        {
            "name": "CompletionRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/CompletionRequest\" />"
        },
        {
            "name": "CompletionResponse",
            "description": "Completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/CompletionResponse\" />"
        },
        {
            "name": "CompletionResponseStreamChunk",
            "description": "streamed completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/CompletionResponseStreamChunk\" />"
        },
        {
            "name": "AgentConfig",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentConfig\" />"
        },
        {
            "name": "CodeInterpreterToolDefinition",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/CodeInterpreterToolDefinition\" />"
        },
        {
            "name": "FunctionCallToolDefinition",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/FunctionCallToolDefinition\" />"
        },
        {
            "name": "MemoryToolDefinition",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryToolDefinition\" />"
        },
        {
            "name": "PhotogenToolDefinition",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/PhotogenToolDefinition\" />"
        },
        {
            "name": "RestAPIExecutionConfig",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RestAPIExecutionConfig\" />"
        },
        {
            "name": "RestAPIMethod",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RestAPIMethod\" />"
        },
        {
            "name": "SearchToolDefinition",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SearchToolDefinition\" />"
        },
        {
            "name": "WolframAlphaToolDefinition",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/WolframAlphaToolDefinition\" />"
        },
        {
            "name": "CreateAgentRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateAgentRequest\" />"
        },
        {
            "name": "AgentCreateResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentCreateResponse\" />"
        },
        {
            "name": "CreateAgentSessionRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateAgentSessionRequest\" />"
        },
        {
            "name": "AgentSessionCreateResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentSessionCreateResponse\" />"
        },
        {
            "name": "Attachment",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Attachment\" />"
        },
        {
            "name": "CreateAgentTurnRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateAgentTurnRequest\" />"
        },
        {
            "name": "AgentTurnResponseEvent",
            "description": "Streamed agent execution response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseEvent\" />"
        },
        {
            "name": "AgentTurnResponseStepCompletePayload",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStepCompletePayload\" />"
        },
        {
            "name": "AgentTurnResponseStepProgressPayload",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStepProgressPayload\" />"
        },
        {
            "name": "AgentTurnResponseStepStartPayload",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStepStartPayload\" />"
        },
        {
            "name": "AgentTurnResponseStreamChunk",
            "description": "streamed agent turn completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStreamChunk\" />"
        },
        {
            "name": "AgentTurnResponseTurnCompletePayload",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseTurnCompletePayload\" />"
        },
        {
            "name": "AgentTurnResponseTurnStartPayload",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseTurnStartPayload\" />"
        },
        {
            "name": "InferenceStep",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/InferenceStep\" />"
        },
        {
            "name": "MemoryRetrievalStep",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryRetrievalStep\" />"
        },
        {
            "name": "SafetyViolation",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SafetyViolation\" />"
        },
        {
            "name": "ShieldCallStep",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ShieldCallStep\" />"
        },
        {
            "name": "ToolExecutionStep",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolExecutionStep\" />"
        },
        {
            "name": "ToolResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolResponse\" />"
        },
        {
            "name": "Turn",
            "description": "A single turn in an interaction with an Agentic System.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Turn\" />"
        },
        {
            "name": "ViolationLevel",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ViolationLevel\" />"
        },
        {
            "name": "DeleteAgentsRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteAgentsRequest\" />"
        },
        {
            "name": "DeleteAgentsSessionRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteAgentsSessionRequest\" />"
        },
        {
            "name": "EmbeddingsRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/EmbeddingsRequest\" />"
        },
        {
            "name": "EmbeddingsResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/EmbeddingsResponse\" />"
        },
        {
            "name": "AgentCandidate",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentCandidate\" />"
        },
        {
            "name": "ModelCandidate",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ModelCandidate\" />"
        },
        {
            "name": "EvaluateRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluateRequest\" />"
        },
        {
            "name": "EvaluateResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluateResponse\" />"
        },
        {
            "name": "ScoringResult",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoringResult\" />"
        },
        {
            "name": "EvaluateBatchRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluateBatchRequest\" />"
        },
        {
            "name": "Job",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Job\" />"
        },
        {
            "name": "GetAgentsSessionRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/GetAgentsSessionRequest\" />"
        },
        {
            "name": "GraphMemoryBankDef",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/GraphMemoryBankDef\" />"
        },
        {
            "name": "KeyValueMemoryBankDef",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/KeyValueMemoryBankDef\" />"
        },
        {
            "name": "KeywordMemoryBankDef",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/KeywordMemoryBankDef\" />"
        },
        {
            "name": "Session",
            "description": "A single session of an interaction with an Agentic System.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Session\" />"
        },
        {
            "name": "VectorMemoryBankDef",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/VectorMemoryBankDef\" />"
        },
        {
            "name": "AgentStepResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentStepResponse\" />"
        },
        {
            "name": "DatasetDefWithProvider",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/DatasetDefWithProvider\" />"
        },
        {
            "name": "ModelDefWithProvider",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ModelDefWithProvider\" />"
        },
        {
            "name": "PaginatedRowsResult",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/PaginatedRowsResult\" />"
        },
        {
            "name": "Parameter",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Parameter\" />"
        },
        {
            "name": "ScoringFnDefWithProvider",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoringFnDefWithProvider\" />"
        },
        {
            "name": "ShieldDefWithProvider",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ShieldDefWithProvider\" />"
        },
        {
            "name": "Trace",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Trace\" />"
        },
        {
            "name": "Checkpoint",
            "description": "Checkpoint created during training runs\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Checkpoint\" />"
        },
        {
            "name": "PostTrainingJobArtifactsResponse",
            "description": "Artifacts of a finetuning job.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJobArtifactsResponse\" />"
        },
        {
            "name": "PostTrainingJobLogStream",
            "description": "Stream of logs from a finetuning job.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJobLogStream\" />"
        },
        {
            "name": "PostTrainingJobStatus",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJobStatus\" />"
        },
        {
            "name": "PostTrainingJobStatusResponse",
            "description": "Status of a finetuning job.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJobStatusResponse\" />"
        },
        {
            "name": "PostTrainingJob",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJob\" />"
        },
        {
            "name": "HealthInfo",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/HealthInfo\" />"
        },
        {
            "name": "MemoryBankDocument",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryBankDocument\" />"
        },
        {
            "name": "InsertDocumentsRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/InsertDocumentsRequest\" />"
        },
        {
            "name": "JobCancelRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/JobCancelRequest\" />"
        },
        {
            "name": "JobStatus",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/JobStatus\" />"
        },
        {
            "name": "ProviderInfo",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ProviderInfo\" />"
        },
        {
            "name": "RouteInfo",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RouteInfo\" />"
        },
        {
            "name": "LogSeverity",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/LogSeverity\" />"
        },
        {
            "name": "MetricEvent",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/MetricEvent\" />"
        },
        {
            "name": "SpanEndPayload",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanEndPayload\" />"
        },
        {
            "name": "SpanStartPayload",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanStartPayload\" />"
        },
        {
            "name": "SpanStatus",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanStatus\" />"
        },
        {
            "name": "StructuredLogEvent",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/StructuredLogEvent\" />"
        },
        {
            "name": "UnstructuredLogEvent",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnstructuredLogEvent\" />"
        },
        {
            "name": "LogEventRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/LogEventRequest\" />"
        },
        {
            "name": "DPOAlignmentConfig",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/DPOAlignmentConfig\" />"
        },
        {
            "name": "OptimizerConfig",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/OptimizerConfig\" />"
        },
        {
            "name": "RLHFAlgorithm",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RLHFAlgorithm\" />"
        },
        {
            "name": "TrainingConfig",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/TrainingConfig\" />"
        },
        {
            "name": "PreferenceOptimizeRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/PreferenceOptimizeRequest\" />"
        },
        {
            "name": "QueryDocumentsRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsRequest\" />"
        },
        {
            "name": "QueryDocumentsResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsResponse\" />"
        },
        {
            "name": "RegisterDatasetRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterDatasetRequest\" />"
        },
        {
            "name": "RegisterMemoryBankRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterMemoryBankRequest\" />"
        },
        {
            "name": "RegisterModelRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterModelRequest\" />"
        },
        {
            "name": "RegisterScoringFunctionRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterScoringFunctionRequest\" />"
        },
        {
            "name": "RegisterShieldRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterShieldRequest\" />"
        },
        {
            "name": "RunShieldRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RunShieldRequest\" />"
        },
        {
            "name": "RunShieldResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/RunShieldResponse\" />"
        },
        {
            "name": "ScoreRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoreRequest\" />"
        },
        {
            "name": "ScoreResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoreResponse\" />"
        },
        {
            "name": "ScoreBatchRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoreBatchRequest\" />"
        },
        {
            "name": "ScoreBatchResponse",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoreBatchResponse\" />"
        },
        {
            "name": "DoraFinetuningConfig",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/DoraFinetuningConfig\" />"
        },
        {
            "name": "FinetuningAlgorithm",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/FinetuningAlgorithm\" />"
        },
        {
            "name": "LoraFinetuningConfig",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/LoraFinetuningConfig\" />"
        },
        {
            "name": "QLoraFinetuningConfig",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/QLoraFinetuningConfig\" />"
        },
        {
            "name": "SupervisedFineTuneRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SupervisedFineTuneRequest\" />"
        },
        {
            "name": "SyntheticDataGenerateRequest",
            "description": "<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerateRequest\" />"
        },
        {
            "name": "SyntheticDataGenerationResponse",
            "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerationResponse\" />"
        }
    ],
    "x-tagGroups": [
        {
            "name": "Operations",
            "tags": [
                "Agents",
                "BatchInference",
                "DatasetIO",
                "Datasets",
                "Eval",
                "Inference",
                "Inspect",
                "Memory",
                "MemoryBanks",
                "Models",
                "PostTraining",
                "Safety",
                "Scoring",
                "ScoringFunctions",
                "Shields",
                "SyntheticDataGeneration",
                "Telemetry"
            ]
        },
        {
            "name": "Types",
            "tags": [
                "AgentCandidate",
                "AgentConfig",
                "AgentCreateResponse",
                "AgentSessionCreateResponse",
                "AgentStepResponse",
                "AgentTurnResponseEvent",
                "AgentTurnResponseStepCompletePayload",
                "AgentTurnResponseStepProgressPayload",
                "AgentTurnResponseStepStartPayload",
                "AgentTurnResponseStreamChunk",
                "AgentTurnResponseTurnCompletePayload",
                "AgentTurnResponseTurnStartPayload",
                "Attachment",
                "BatchChatCompletionRequest",
                "BatchChatCompletionResponse",
                "BatchCompletionRequest",
                "BatchCompletionResponse",
                "BuiltinTool",
                "CancelTrainingJobRequest",
                "ChatCompletionRequest",
                "ChatCompletionResponse",
                "ChatCompletionResponseEvent",
                "ChatCompletionResponseEventType",
                "ChatCompletionResponseStreamChunk",
                "Checkpoint",
                "CodeInterpreterToolDefinition",
                "CompletionMessage",
                "CompletionRequest",
                "CompletionResponse",
                "CompletionResponseStreamChunk",
                "CreateAgentRequest",
                "CreateAgentSessionRequest",
                "CreateAgentTurnRequest",
                "DPOAlignmentConfig",
                "DatasetDefWithProvider",
                "DeleteAgentsRequest",
                "DeleteAgentsSessionRequest",
                "DoraFinetuningConfig",
                "EmbeddingsRequest",
                "EmbeddingsResponse",
                "EvaluateBatchRequest",
                "EvaluateRequest",
                "EvaluateResponse",
                "FinetuningAlgorithm",
                "FunctionCallToolDefinition",
                "GetAgentsSessionRequest",
                "GraphMemoryBankDef",
                "HealthInfo",
                "ImageMedia",
                "InferenceStep",
                "InsertDocumentsRequest",
                "Job",
                "JobCancelRequest",
                "JobStatus",
                "KeyValueMemoryBankDef",
                "KeywordMemoryBankDef",
                "LogEventRequest",
                "LogSeverity",
                "LoraFinetuningConfig",
                "MemoryBankDocument",
                "MemoryRetrievalStep",
                "MemoryToolDefinition",
                "MetricEvent",
                "ModelCandidate",
                "ModelDefWithProvider",
                "OptimizerConfig",
                "PaginatedRowsResult",
                "Parameter",
                "PhotogenToolDefinition",
                "PostTrainingJob",
                "PostTrainingJobArtifactsResponse",
                "PostTrainingJobLogStream",
                "PostTrainingJobStatus",
                "PostTrainingJobStatusResponse",
                "PreferenceOptimizeRequest",
                "ProviderInfo",
                "QLoraFinetuningConfig",
                "QueryDocumentsRequest",
                "QueryDocumentsResponse",
                "RLHFAlgorithm",
                "RegisterDatasetRequest",
                "RegisterMemoryBankRequest",
                "RegisterModelRequest",
                "RegisterScoringFunctionRequest",
                "RegisterShieldRequest",
                "RestAPIExecutionConfig",
                "RestAPIMethod",
                "RouteInfo",
                "RunShieldRequest",
                "RunShieldResponse",
                "SafetyViolation",
                "SamplingParams",
                "SamplingStrategy",
                "ScoreBatchRequest",
                "ScoreBatchResponse",
                "ScoreRequest",
                "ScoreResponse",
                "ScoringFnDefWithProvider",
                "ScoringResult",
                "SearchToolDefinition",
                "Session",
                "ShieldCallStep",
                "ShieldDefWithProvider",
                "SpanEndPayload",
                "SpanStartPayload",
                "SpanStatus",
                "StopReason",
                "StructuredLogEvent",
                "SupervisedFineTuneRequest",
                "SyntheticDataGenerateRequest",
                "SyntheticDataGenerationResponse",
                "SystemMessage",
                "TokenLogProbs",
                "ToolCall",
                "ToolCallDelta",
                "ToolCallParseStatus",
                "ToolChoice",
                "ToolDefinition",
                "ToolExecutionStep",
                "ToolParamDefinition",
                "ToolPromptFormat",
                "ToolResponse",
                "ToolResponseMessage",
                "Trace",
                "TrainingConfig",
                "Turn",
                "URL",
                "UnstructuredLogEvent",
                "UserMessage",
                "VectorMemoryBankDef",
                "ViolationLevel",
                "WolframAlphaToolDefinition"
            ]
        }
    ]
};
            options = {
                downloadFileName: "openapi.json",
                expandResponses: "200",
                expandSingleSchemaField: true,
                jsonSampleExpandLevel: "all",
                schemaExpansionLevel: "all",
            };
            element = document.getElementById("openapi-container");
            Redoc.init(spec, options, element);

            if (spec.info && spec.info.title) {
                document.title = spec.info.title;
            }
        });
    </script>
</head>

<body>
    <div id="openapi-container"></div>
</body>

</html>
